#!/usr/bin/env bash

echo -e "\033[34m--------------------wsgi process--------------------\033[0m"

ps -ef| grep wsgi.ini | grep -v grep

sleep 0.5

echo -e "\033[34m------------------kill wsgi process-----------------\033[0m"

ps -ef| grep wsgi.ini | grep -v grep | awk '{print $2}' | xargs kill -9

sleep 0.5

echo -e "\033[34m---------check if the kill action is correct--------\033[0m"


/home/lincaiwei/.local/bin/uwsgi -d --ini uwsgi.ini & >/dev/null

echo -e "\033[34m--------------------wsgi process--------------------\033[0m"

sleep 1

ps -ef| grep wsgi.ini | grep -v grep
